#ifndef _CANARY2_SYS_SLEEPER_CONCEPTS_H_
#define _CANARY2_SYS_SLEEPER_CONCEPTS_H_

#include <chrono>
#include <utility>

namespace wilson::sys
{
    template<typename S>
    concept sleeper = ::std::invocable<S> && requires(S s)
    {
        s.awake();

        // Sleep
        s.operator()();

        // Sleep with timeout
        s.operator()(::std::declval<::std::chrono::milliseconds>());
        { s.done() } -> ::std::same_as<bool>;

        s.suspend_manager();
    };
}

#endif
